<template>
    <div>
        <User-Head>
            <User-Body></User-Body>
        </User-Head>
        
       
        <router-view></router-view>
    </div>
</template>

<script>
import { onMounted, ref } from '@vue/runtime-core'
import { useRoute } from 'vue-router'
import http from '../util/http'
import UserHead from '../components/user/UserHead.vue'
import UserBody from '../components/user/UserBody.vue'
export default {
    setup(){
        const route=useRoute();
        const userList=ref('')

        onMounted(()=>{
            http({
                url:`/api/v1/feed/${route.params.myid}?pageIndex=1&pageSize=10&type=0`
            })
            .then(res=>{
                console.log(res.data);
                userList.value=res.data.data
                console.log(userList);
            })
            
        })


        

        return {
            userList
        }
    },
    components:{
            UserHead,
            UserBody
        }
}
</script>